package tech.yunqian.slim.project.domain;

import java.util.HashMap;
import java.util.Map;

import lombok.Data;

@Data
public class DeviceMonitorRuleTrackingItem {
    private Device device;
    private Map<Integer, MonitorRuleTrackingItem> monitorRuleTrackingItemMap;

    public DeviceMonitorRuleTrackingItem(Device device) {
        this.device = device;
        this.monitorRuleTrackingItemMap = new HashMap<>();
    }

    public Boolean contains(Integer monitorRuleId) {
        return this.monitorRuleTrackingItemMap.containsKey(monitorRuleId);
    }

    public MonitorRuleTrackingItem getItem(Integer monitorRuleId) {
        return this.monitorRuleTrackingItemMap.get(monitorRuleId);
    }

    public void putItem(Integer monitorRuleId, MonitorRuleTrackingItem monitorRuleTrackingItem) {
        this.monitorRuleTrackingItemMap.put(monitorRuleId, monitorRuleTrackingItem);
    }
}
